package com.qw.controller;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author Arnold Yand
 * @since Jan 1, 2018 4:31:59 PM
 * @summary com.qw.page.controller.PortalController.java
 */
@Controller
@RequestMapping("/demo")
public class DemoController {

  @RequestMapping("/json")
  @ResponseBody
  public Map<String, Object> json() {
    Map<String, Object> param = new HashMap<String, Object>();
    param.put("username", "x01");
    param.put("password", "000x01");
    return param;
  }

  @RequestMapping("/freemark")
  public String freemark(ModelMap param, String userName) {
    param.put("userName", userName);
    return "/demo/hello";
  }
  
  @RequestMapping("/html")
  public String html() {
    return "/demo/hey.html";
  }

}
